<template>
  <div class="component-state-panel">
    <div class="header">
      <div class="state-name">资源名称: {{ name }}</div>
      <div class="state-fps">帧率: {{ fps }}</div>
    </div>
    <div class="tools">
      <button @click="save">保存</button>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  props: {
    name: String,
    fps: String
  },
  methods: {
    save() {
      this.$emit('save')
    }
  }
})
</script>
<style lang="scss" scoped>
.component-state-panel {
  position: fixed;
  background-color: white;
  border: 2px solid gray;
  font-size: 16px;
  top: 15px;
  right: 10px;
  width: 280px;
  box-sizing: border-box;
  padding: 10px;
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
</style>
